Astronomers observe thousands of planets beyond our Solar System, many with extreme interior conditions. Deep inside these worlds, gravity produces pressures millions to billions of times stronger than Earth’s atmosphere. At these pressures, matter behaves in surprising ways: hydrogen can become metallic, water and ammonia may form exotic superionic states, and hydrocarbons can turn into diamond. This Colloquium describes how studying these unusual materials helps scientists explain how planets form, evolve, and generate magnetic fields and magma oceans. Using powerful lasers and pulsed-power facilities, researchers recreate such pressures in laboratories, revealing new physics and improving understanding of the hidden interiors of distant planets.